﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#include "IFamilyDimensionConstraint.h"
#include "GmFamilyService.h"

namespace gfam
{
    enum class EllipseConstraintType : int32_t
    {
        Major_Length = 0,       ///< 椭圆长轴
        Minor_Length = 1        ///< 椭圆短轴
    };

    /// \brief  椭圆半径约束
    class GM_FAMILY_SERVICE_EXPORT IFamilyEllipseRadiusConstraint : public IFamilyDimensionConstraint
    {
        DEFINE_CAST_DERIVED(gfam::IFamilyEllipseRadiusConstraint, gfam::IFamilyDimensionConstraint)

    public:
        /// \brief  创建椭圆半径约束
        ///
        /// \param  pDocument  文档
        /// \param  sketchId 草图id
        /// \param  option  创建选项
        /// \return 椭圆半径约束
        static IFamilyEllipseRadiusConstraint* Create(gcmp::IDocument* pDocument, const gcmp::ElementId& sketchId, gcmp::ElementCreationOptions eco);

        /// \brief  创建椭圆半径约束
        ///
        /// \param  pDocument  文档
        /// \param  position  椭圆圆心位置
        /// \param  dimValue  约束值
        /// \param  referenceObjectId  参考对象Id
        /// \param  sketchId 草图id  
        /// \param  sketchPlaneId 草图平面id
        /// \param  coord  坐标系
        /// \param eco 创建选项
        /// \return 椭圆半径约束
        static IFamilyEllipseRadiusConstraint* Create(gcmp::IDocument* pDocument, const gcmp::Vector3d& position, double dimValue, const gcmp::ElementId& referenceObjectId, const gcmp::ElementId& sketchId, const gcmp::ElementId& sketchPlaneId, const gcmp::Coordinate3d& coord, gcmp::ElementCreationOptions eco);

        /// \brief 设置椭圆约束类型
        ///
        /// \param  ellipseConstraintType  椭圆约束类型
        /// \return void
        virtual void SetEllipseConstraintType(EllipseConstraintType ellipseConstraintType) = 0;

        /// \brief 获取椭圆约束类型
        ///
        /// \return 椭圆约束类型
        virtual EllipseConstraintType GetEllipseConstraintType() const = 0;
    };

}


